package com.demo.springboot;

import org.springframework.context.ApplicationListener;

/**
 * 定义监听器 方法④
 */
public class MyApplicationListener2 implements ApplicationListener<MyApplicationEvent> {
    @Override
    public void onApplicationEvent(MyApplicationEvent event) {
        System.out.println("收到事件2{spring.factories}："+event.getClass());
    }
}
